﻿using DocumentFormat.OpenXml.Lite.Helper;
using DocumentFormat.OpenXml.Lite.WordprocessingML.Word.Types;
using DocumentFormat.OpenXml.Lite.Xml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace DocumentFormat.OpenXml.Lite.WordprocessingML.Word.Table.Properties
{
    [XmlRoot("tblLayout", Namespace = Constants.WordMain)]
    public class Layout : XmlSerializable, ITablePropElement
    {
        [Optional]
        [XmlAttribute("type", Namespace = Constants.WordMain, Form = XmlSchemaForm.Qualified)]
        public Nullable<ST_TblLayoutType> Type { get; set; }

        public Layout() { }
        
        public void Copy(object obj)
        {
            if (obj is Layout)
            {
                this.Type = (obj as Layout).Type;
            }
        }
    }
}
